#include "LightSource.h"
#include "GFuns.h"

LightSource::LightSource(ELightSource aSource, Point aPosition)
{
	source = aSource;
	position = aPosition;
	Color c;

	if(aSource == LIGHT_TORCH)
	{
		color = c.white;
		radiusBase = 67;
		radiusDiss = 10;
		radius = radiusBase + randInterval(-radiusDiss, radiusDiss);
	}
}

LightSource::~LightSource()
{
}

void LightSource::Tick()
{
	radius += randInt(-1,1);
	if(radius > radiusBase + radiusDiss) radius = radiusBase + radiusDiss;
	if(radius < radiusBase - radiusDiss) radius = radiusBase - radiusDiss;
}